USE [ERP]
GO

/****** Object:  Table [dbo].[EmployeeTimeCards]    Script Date: 11/16/2009 14:34:11 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[EmployeeTimeCards](
	[EmployeeID] [nvarchar](50) NOT NULL,
	[CheckDate] [datetime] NOT NULL,
	[CheckDirectionID] [nvarchar](50) NULL,
 CONSTRAINT [PK_EmployeeTimeCards] PRIMARY KEY CLUSTERED 
(
	[EmployeeID] ASC,
	[CheckDate] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[EmployeeTimeCards]  WITH CHECK ADD  CONSTRAINT [FK_EmployeeTimeCards_CheckDirections] FOREIGN KEY([CheckDirectionID])
REFERENCES [dbo].[CheckDirections] ([ID])
GO

ALTER TABLE [dbo].[EmployeeTimeCards] CHECK CONSTRAINT [FK_EmployeeTimeCards_CheckDirections]
GO

ALTER TABLE [dbo].[EmployeeTimeCards]  WITH CHECK ADD  CONSTRAINT [FK_EmployeeTimeCards_Employees] FOREIGN KEY([EmployeeID])
REFERENCES [dbo].[Employees] ([ID])
GO

ALTER TABLE [dbo].[EmployeeTimeCards] CHECK CONSTRAINT [FK_EmployeeTimeCards_Employees]
GO

